We consider in this paper the effect of synchrotron self-Compton process on X-ray afterglows of gamma-ray bursts. We find that for a wide range of parameter values, especially for the standard values which imply the energy in the electrons behind the afterglow shock is tens times as that in the magnetic field, the electron cooling is dominated by Compton cooling rather than synchrotron one. This leads to a different evolution of cooling frequency in the synchrotron emission component, and hence a different (flatter) light curve slope in the X-ray range. This effect should be taken into account when estimating the afterglow parameters by X-ray observational data. For somewhat higher ambient density, the synchrotron self-Compton emission may be directly detected in X-ray range, showing varying spectral slopes and a quite steep light curve slope.